package com.nacos.springboot.snail.controller;

import com.alibaba.nacos.api.config.annotation.NacosValue;
import com.alibaba.nacos.spring.context.annotation.config.NacosPropertySource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description TODO
 * @Author xueguoping
 * @Date 2021/5/8 10:44
 */
@NacosPropertySource(dataId = "example",autoRefreshed = true)
@RestController
public class NacosConfigController {

	@NacosValue(value = "${info:local hello world}",autoRefreshed = true)
	private String info;

	@GetMapping("/config")
	public String get(){
		return  info;
	}
}
